import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/rb-merchant/merchant/memberTrade/list',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const getDetail = (params) => {
  return request({
    url: '/api/rb-merchant/merchant/memberMerchant/info',
    method: 'get',
    params: {
      ...params
    }
  })
}

export const getStatistics = (current, size, params) => {
  return request({
    url: '/api/rb-merchant/merchant/memberTrade/statistics',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const getTicketList = (current, size, params) => {
  return request({
    url: '/api/rb-merchant/merchant/memberMerchant/ticketList',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}


/* 服务商 导出 */
export const getExport = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-merchant/merchant/memberTrade/export',
    method: 'get',
    params: {
      ...params,
    }
  })
}

/* 服务商 导出模板 */
export const getExportTemplate = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-merchant/merchant/serviceInfo/service_info/export-template',
    method: 'get',
    params: {
      ...params,
    }
  })
}